package com.apex.lottery.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName UserIdentityEnum
 * @Description 枚举身份
 * @Author ZJX
 * @Date 2024/10/12 12:54
 * @Version 1.0
 */

@Getter
@AllArgsConstructor
public enum UserIdentityEnum {
    ADMIN("管理员"),
    NORMAL("普通用户")
    ;

    private final String message;

    public static UserIdentityEnum forName(String name){
        for(UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()){
            if (userIdentityEnum.name().equalsIgnoreCase(name)){
                return userIdentityEnum;
            }
        }
        return null;
    }

}
